load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")

package(default_visibility = [
    "//rs/crypto:__subpackages__",
])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/monitoring/metrics",
    "@crate_index//:prometheus",
    "@crate_index//:strum",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:strum_macros",
]

DEV_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:convert_case",
]

MACRO_DEV_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "logmon",
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "ic_crypto_internal_logmon",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_test(
    name = "logmon_test",
    aliases = ALIASES,
    crate = ":logmon",
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)

rust_doc_test(
    name = "logmon_doc_test",
    crate = ":logmon",
)
